{/* LAYOUT模板 */}
	<layout name="layout"/>
{/* LAYOUT模板 */}
{/* import Js,Css */}
	<js href="__PUBLIC__/js/admin/listTable.js"/>
	<js href="__PUBLIC__/js/admin/js.util.js"/>
	<css href="__PUBLIC__/css/admin/common.css"/>
	<js href="__PUBLIC__/js/admin/js.selectzone.js"/>
	
	<css href="__PUBLIC__/css/jquery-ui.css" />
	<js href="__PUBLIC__/js/core/jquery-ui.1.10.4.js" />
	<js href="__PUBLIC__/js/core/plugins.js"/>
{/* import js,css */}
<!-- [position] -->
	<include file="Template:position"/>
<!-- [position] -->

<div class="form-div">
	<form action="javascript:searchArticle()" name="searchForm">
		<img src="__PUBLIC__/image/admin/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
			关键字 
			<input type="text" name="keyword" id="keyword" />
		<input type="submit" value="搜索"/>
	</form>
</div>

<form method="POST" action="exchange_goods.php?act=batch_remove" name="listForm">
	<!-- start cat list -->
	<div class="list-div" id="listDiv">
		<table cellspacing='1' cellpadding='3' id='list-table' width="100%">
			<tr>
				<th>
					<input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox">
					<a href="javascript:listTable.sort('goods_id'); "> 编号</a>{$sort_goods_id}
				</th>
				<th><a href="javascript:listTable.sort('goods_name'); ">商品</a>{$sort_goods_name}</th>
				<th><a href="javascript:listTable.sort('exchange_integral'); ">使用积分值</a>{$sort_exchange_integral}</th>
				<th><a href="javascript:listTable.sort('is_exchange'); ">是否可兑换</a>{$sort_is_exchange}</th>
				<th><a href="javascript:listTable.sort('is_hot'); ">是否热销</a>{$sort_is_hot}</th>
				<th>操作</th>
			</tr>
			<volist name="goods_list" id="list">
			<tr>
				<td>
					<span>
						<input name="checkboxes[]" type="checkbox" value="{$list.goods_id}"/>
						{$list.goods_id}
					</span>
					</td>
				<td class="first-cell">
					<span>{$list.goods_name}</span>
				</td>
				<td align="center">
					<span onclick="listTable.edit(this, 'edit_exchange_integral', {$list.goods_id})">{$list.exchange_integral}</span>
				</td>
				<td align="center">
					<if condition="$list['is_exchange'] eq 1">
						<img src="__PUBLIC__/image/admin/yes.gif" onclick="listTable.toggle(this, 'toggle_exchange', {$list.goods_id})" />
					<else/>
						<img src="__PUBLIC__/image/admin/no.gif" onclick="listTable.toggle(this, 'toggle_exchange', {$list.goods_id})" />
					</if>
				</td>
				<td align="center">
					<if condition="$list['is_hot'] eq 1">
						<img src="__PUBLIC__/image/admin/yes.gif" onclick="listTable.toggle(this, 'toggle_hot', {$list.goods_id})" />
					<else/>
						<img src="__PUBLIC__/image/admin/no.gif" onclick="listTable.toggle(this, 'toggle_hot', {$list.goods_id})" />
					</if>
					
				</td>
				<td align="center" nowrap="true">
					<span>
						<a href="#" target="_blank" title="{$lang.view}">
							<img src="__PUBLIC__/image/admin/icon_view.gif" border="0" height="16" width="16" />
						</a>&nbsp;
						<a href="__URL__/mod_exchangegoods?id={$list.goods_id}" title="编辑">
							<img src="__PUBLIC__/image/admin/icon_edit.gif" border="0" height="16" width="16" />
						</a>&nbsp;
						<a href="__URL__/remove_exchangegoods?id={$list.goods_id}" onclick="listTable.remove({$list.goods_id}, '{$Think.lang.drop_confirm}')" title="移除">
							<img src="__PUBLIC__/image/admin/icon_drop.gif" border="0" height="16" width="16">
						</a>
					</span>				
				</td>
			</tr>
			</volist>
		</table>
	</div>
	<!-- end cat list -->
</form>

<script type="text/javascript" language="JavaScript">
	onload = function(){
		// 开始检查订单
		startCheckOrder();
	}

	/* 搜索文章 */
	function searchArticle(){
		listTable.filter.keyword = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
		listTable.filter.page = 1;
		listTable.loadList();
	}
</script>
